Question: $f(x) = \begin{cases} \sqrt{x } & \text{for} ~~~~x\gt{0} \\ -x& \text{for} ~~~~ x \leq0\end{cases}$ Evaluate the definite integral. $\int^9_{-2}f(x)\,dx = $ Choose 1 answer: Choose 1 answer: (Choice A) A $\dfrac13$ (Choice B) B $\dfrac{10}{3}$ (Choice C) C $14$ (Choice D) D $20$
Explanation: Splitting up the definite integral Since we're working with a piecewise function, we need to split the definite integral up into two pieces: $\phantom{=} \int^9_{-2}f(x)\,dx$ $= \int^9_{0}f(x)\,dx + \int^{0}_{-2}f(x)\,dx~~~~~~$ [Why did we split at 0?] $= \int^9_{0}\sqrt{x}\,dx + \int^0_{-2}-x\,dx ~~~~~~$ Evaluating each piece Next, let's evaluate each of these definite integrals one at a time. The first definite integral: $\begin{aligned} \int^9_{0}x^\frac12\,dx &=\dfrac23x^\frac32\Bigg|^9_{{0}} \\\\ &= \left[\dfrac23 ( 9)^\frac32 \right] - \left[\dfrac23 ({0})^\frac32\right] \\\\ &= \left[18\right] -\left[0 \right] \\\\ &= {18}\end{aligned}$ The second definite integral: $\begin{aligned} \int^0_{-2}-x\,dx &=-\dfrac12x^2\Bigg|^0_{{-2}} \\\\ &= \left[-\dfrac12 ( 0)^2 \right] - \left[-\dfrac12 ({-2})^2\right] \\\\ &= \left[0\right] -\left[-2 \right] \\\\ &= {2}\end{aligned}$ Putting the pieces together Now let's add these two pieces together to find the answer: $\phantom{=} \int^9_{0}\sqrt{x}\,dx + \int^0_{-2}-x\,dx$ $ = {18} + {2}$ $ = 20$ The answer $\int^9_{-2}f(x)\,dx = 20$